package com.yongninger.adapter;

import java.util.HashMap;
import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.yongninger.activity.R;

public class CustomerListViewAdapter extends ListViewAdapter {
	public CustomerListViewAdapter(Context context,
			List<HashMap<String, Object>> items) {
		super(context, items);
	}

	@Override
	public View getView(int position, View view, ViewGroup parent) {
		if (view == null) {
			view = inflater.inflate(R.layout.customer_item, null);
		}
		TextView text1 = (TextView) view.findViewById(R.id.cccname);
		text1.setText(items.get(position).get("cccname").toString());
		TextView text2 = (TextView) view.findViewById(R.id.cccperson);
		text2.setText(items.get(position).get("cccperson").toString());
		TextView text3 = (TextView) view.findViewById(R.id.cccontact);
		text3.setText(items.get(position).get("cccontact").toString());
		TextView text4 = (TextView) view.findViewById(R.id.ccclerk);
		text4.setText(items.get(position).get("ccclerk").toString());
		return view;
	}
}
